
<!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>支出编辑</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

     <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="__PUBLIC__/css/page.css" rel="stylesheet">
    <link href="__PUBLIC__/css/new.css" rel="stylesheet">
	<script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>
    
   
	
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <if condition=" !empty($expenditure)"> 
                           <h5>支出编辑</h5>
                        <else/>
                           <h5>支出提交</h5>
                        </if>
                        
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="commentForm" action="{:U('expenditure_add')}" method="post">
							<input type='hidden' name="id" id='id' value='<if condition=" !empty($expenditure)"> {$expenditure.id} </if>' />
                            <input type='hidden' name="jumpurl" id='jumpurl' value='<if condition=" !empty($expenditure)"> {$jumpurl} </if>' />
                            <div class="form-group">
                                <label class="col-sm-3 control-label">销售员：</label>
                                <div class="col-sm-9">
                                    <input readonly type="text"  class="form-control width200 inline" value="<?php echo empty($expenditure['user_id'])?$_SESSION['user']['username']:$expenditure['username']; ?>"  style='width:150px' name='username'>
                                     
                                     &nbsp&nbsp  
                                    <label>时间：</label>
                                    	<if condition=" $user_type eq 2 || empty($expenditure)">
                                        <input class="form-control width200 inline" placeholder="" name='expenditure_time' id='expenditure_time' onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" value="<?php echo empty($expenditure)?date('Y-m-d H:i:s'):$expenditure['expenditure_time']; ?>">
                                         <else />
                                          <input readonly class="form-control width200 inline" placeholder="" name='expenditure_time' id='expenditure_time' value="<?php echo empty($expenditure)?date('Y-m-d H:i:s'):$expenditure['expenditure_time']; ?>">
                                        </if>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-sm-3 control-label">支出项目说明：</label>
                                <div class="col-sm-4">
                                <if condition=" $user_type eq 2 || empty($expenditure) ">
                                    <input id="expenditure_desc" name="expenditure_desc" minlength="2" type="text" class="form-control"  aria-required=""  autocomplete="off" {$res4?"":""} onfocus="this.type='text'" value='<if condition=" !empty($expenditure)"> {$expenditure.expenditure_desc} </if>'>
                                <else />
                                   <input readonly id="expenditure_desc" name="expenditure_desc" minlength="2" type="text" class="form-control"  aria-required=""  autocomplete="off" {$res4?"":""} onfocus="this.type='text'" value='<if condition=" !empty($expenditure)"> {$expenditure.expenditure_desc} </if>'>
                            </if>
                                     <span style='color:red'>本金+佣金*单数</span>
                                </div> 
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">支出用途：</label>
                               
                                <div class="col-sm-9">
                                <if condition=" $user_type eq 2 || empty($expenditure)">
                                    <select class="form-control width200 inline"  name='purpose'>
                                 <else />
                                    <select onfocus="this.defaultIndex=this.selectedIndex;" onchange="this.selectedIndex=this.defaultIndex;" class="form-control width200 inline"  style='width:150px' name='purpose'>
                                </if>
                                       <option value='0'>请选择</option>
                                       <if condition=" $purpose_list "> 
                                		<foreach name="purpose_list" item="purpose" >
                                       <option value='{$purpose.id}' <?php echo ($expenditure['purpose']==$purpose['id'])?'selected':'' ?> >{$purpose.name}</option>
                                        </foreach>
                                      </if>
                                    </select>
                                     &nbsp&nbsp  
                                    <label>部门：</label>
                                    <if condition=" $user_type eq 2 || empty($expenditure)">
                                       <select class="form-control width200 inline" style='width:150px' name='customer_group'>
                                    <else />
                                       <select onfocus="this.defaultIndex=this.selectedIndex;" onchange="this.selectedIndex=this.defaultIndex;" class="form-control width200 inline" name='customer_group'>
                                    </if>
                                       <option value='0'>请选择</option>
                                       <if condition=" $shop_list "> 
                                		<foreach name="shop_list" item="shop" >
                                         <option value='{$shop.id}'  <?php echo ($expenditure['customer_group']==$shop['id'])?'selected':'' ?> >{$shop.shop_name}</option>
                                        </foreach>
                                       </if>
                                    </select>
                                   
                                    
                                 
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">收款人：</label>
                                <div class="col-sm-9">
                                	 <if condition=" $user_type eq 2 || empty($expenditure)">
                                         <select class="form-control width200 inline"  name='payee'>
                                     <else />
                                         <select onfocus="this.defaultIndex=this.selectedIndex;" onchange="this.selectedIndex=this.defaultIndex;"  class="form-control width200 inline"  style='width:150px' name='payee'>
                                     </if>
                                           <option value='0'>请选择</option>
                                           <if condition=" $payee_list "> 
                                            <foreach name="payee_list" item="payee" >
                                           <option value='{$payee.id}' <?php echo ($expenditure['payee']==$payee['id'])?'selected':'' ?> >{$payee.name}</option>
                                            </foreach>
                                          </if>
                                        </select>
                                    <if condition=" $user_type eq 2 || empty($expenditure)">
                                          <input type='text' class='form-control width100 inline' name='payee2' value="<?php echo empty($expenditure['payee2'])?'':$expenditure['payee2']; ?>">
                                     <else />
                                          <input readonly type='text' class='form-control width100 inline' name='payee2' value="<?php echo empty($expenditure['payee2'])?'':$expenditure['payee2']; ?>">
                                    </if>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">支出金额：</label>
                                <div class="col-sm-2">
                                	<if condition=" $user_type eq 2 || empty($expenditure)">
                                         <input id="amount" type="amount" class="form-control" name="amount" value='<if condition=" !empty($expenditure)"> {$expenditure.amount} </if>'>
                                     <else />
                                         <input readonly id="amount" type="amount" class="form-control width200" name="amount" value='<if condition=" !empty($expenditure)"> {$expenditure.amount} </if>'>
                                    </if>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">佣金单价：</label>
                                <div class="col-sm-9">
                                <if condition=" $user_type eq 2 || empty($expenditure)">
                                    <input class="form-control width250 inline" placeholder="" name='unit_price' id='unit_price'  value="{$expenditure.unit_price}">
                                 <else />
                                     <input readonly class="form-control width250 inline" placeholder="" name='unit_price' id='unit_price'  value="{$expenditure.unit_price}">
                                </if>
                                     &nbsp&nbsp  
                                    刷单数量：
                                 <if condition=" $user_type eq 2 || empty($expenditure)">
                                     <input type='text' name='num' class='form-control width100 inline' value="{$expenditure.num}">
                                 <else />
                                     <input readonly type='text' name='num' class='form-control width100 inline' style='width:100px'value="{$expenditure.num}">
                                </if>
                                    
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">流动资金：</label>
                                <div class="col-sm-2">
                                <if condition=" $user_type eq 2 || empty($expenditure)">
                                    <input id="floating_capital" type="text" class="form-control" name="floating_capital" value='<if condition=" !empty($expenditure)"> {$expenditure.floating_capital} </if>'>
                                 <else />
                                      <input readonly id="floating_capital" type="text" class="form-control" name="floating_capital" value='<if condition=" !empty($expenditure)"> {$expenditure.floating_capital} </if>'>
                                </if>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-4">
                                    <textarea  class='form-control' name='remarks'>{$expenditure.remarks}</textarea>
                                    <br><span> 接电话就写 400电话 关键词留空：比如来源百度就写百度 关键在企业QQ里面查询认证无误在填写。请勿乱填</span>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-3">
                                	<input type="submit" value='提交'  class="btn btn-primary"  />
                                   <!--<span class="btn btn-primary" id='submit'>提交</span>-->
                                   <input type='reset' class="btn btn-primary">
                                   <if condition=" !empty($expenditure)"> 
                                    <a class="btn btn-primary" href='javascript:history.back(-1)'>返回</a>
                                   </if>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/js/jquery.min63b9.js?v=2.1.4"></script>
	<script src="__PUBLIC__/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="__PUBLIC__/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="__PUBLIC__/js/content.mine209.js?v=1.0.0"></script>
    <script src="__PUBLIC__/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/js/demo/peity-demo.min.js"></script>
    
    <script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
    <script src="__PUBLIC__/js/plugins/jquery.tablesort.min.js"></script>

</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>
